let router = [{
	path: '/user',
	component: "Layout",
	redirect: '/user/index',
	name: 'user',
	meta: {
		title: '会员管理',
		icon: 'ios-contacts'
	},
	children: [{
			path: 'index',
			name: 'userlist',
			component: 'user/user',
			meta: {
				title: '店铺会员',
				icon: 'user'
			},
			menu: 'user'
		},
		{
			path: 'role',
			name: 'role',
			component: 'user/role',
			meta: {
				title: '会员等级',
				icon: 'password'
			},
			menu: 'user'
		},
	]
},

{
	path: '/goods',
	component: "Layout",
	redirect: '/goods/index',
	name: 'goods',
	meta: {
		title: '商品管理',
		icon: 'ios-contacts'
	},
	children: [{
			path: 'create',
			name: 'goodslist',
			component: 'goods/create',
			meta: {
				title: '发布商品',
			},
			menu: 'goods'
		},
		{
			path: 'index',
			name: 'goodsindex',
			component: 'goods/index',
			meta: {
				title: '出售中商品',
			},
			menu: 'goods'
		},
		{
			path: 'category',
			name: 'goodscategory',
			component: 'goods/category',
			meta: {
				title: '商品分类',
			},
			menu: 'goods'
		},
		{
			path: 'grouping',
			name: 'goodsgrouping',
			component: 'goods/grouping',
			meta: {
				title: '商品分组',
			},
			menu: 'goods'
		},
	]
}

]

export const getRouter = data => {
	return new Promise((resolve) => {
		var a = JSON.parse(JSON.stringify(router))
		resolve(a)
	})
}
